<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <title>学生成绩管理</title>
    <!-- Bootstrap core CSS -->
    <link href="../static/asserts/css/bootstrap.min.css" th:href="@{/asserts/css/bootstrap.min.css}" rel="stylesheet">
    <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.js"></script>
    <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.css" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="../static/asserts/css/dashboard.css" th:href="@{/asserts/css/dashboard.css}" rel="stylesheet">
    <style type="text/css">
        /* Chart.js */

        @-webkit-keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        @keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        .chartjs-render-monitor {
            -webkit-animation: chartjs-render-animation 0.001s;
            animation: chartjs-render-animation 0.001s;
        }
    </style>
</head>

<body>
<div th:replace="sidbar::#topbar"></div>

<div class="container-fluid">
    <div class="row">
        <div th:replace="sidbar::#sbar"></div>

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <div class="chartjs-size-monitor"
                 style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px; overflow: hidden; pointer-events: none; visibility: hidden; z-index: -1;">
                <div class="chartjs-size-monitor-expand"
                     style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;">
                    <div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div>
                </div>
                <div class="chartjs-size-monitor-shrink"
                     style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;">
                    <div style="position:absolute;width:200%;height:200%;left:0; top:0"></div>
                </div>
            </div>


            <br/>
            <br/>
            <div class="container-fluid" style="border:gray solid 1px;margin-top: -20px ">
                <div style="text-align: center; ">
                    <h3 th:text="'学生名字:'+${student.getName()}+'  学生编号:'+${student.getId()}"></h3>
                    <h2>考试成绩设置管理</h2>
                </div>
                <div class="row">
<!--                    <div class="col-md-2">-->
<!--                        <a th:href="@{#}" class="btn btn-warning">添加学生</a>-->
<!--                    </div>-->
                    <div class="col-md-2 col-md-offset-1">
                        <a class="btn btn-warning" th:href="@{/score/toaddd(sid=${student.getId()})}" th:text="去添加"></a>
                    </div>
                    <div class="col-md-offset-1 col-md-4">
                    </div>
                </div>
                <div id="bodyy" >
                    <table class="table table-bordered">
                        <thead>
                        <tr>
                            <th th:if="type=='exam'">学生编号</th>
                            <th  th:if="type=='exam'">学生名字</th>
                            <th>学院名称</th>
                            <th>考试科目编号</th>
                            <th>考试科目名称</th>
                            <th>考试科目学分</th>
                            <th>考试成绩</th>
                            <th>成绩操作 </th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="its,a:${pageInfoL.list}">
                            <td th:text="${its.getStudent().getId()}" th:if="type=='exam'">学生id</td>
                            <td class="primary" th:if="type=='exam'"><a class="btn btn-outline-primary"
                                                   th:href="@{#}" th:text="${its.getStudent().getName()}"> 学生名字</a></td>
                            <td class="border-info" >
                                <div class="btn btn-outline-info"
                                   th:text="${college.getName()}">学院名称</div>
                            </td>
                            <td  th:text="${its.getEid()}">
                            </td>
                            <td class="warning" >
                                <a class="btn btn-outline-info"   th:href="@{#}"
                                   th:text="${its.getExam().getSubjects()}"></a>
                            </td>
                            <td class="warning" >
                                <a class="btn btn-outline-info"   th:href="@{#}"
                                   th:text="${its.getExam().getScore()}"></a>
                            </td>
                            <td class="border-info"  th:text="${its.getScore()==null?'没设置成绩':its.getScore()}">
                            </td>
                            <td class="warning" >
                                <a class="btn btn-outline-info"   th:href="@{/score/toupd(sid=${its.getStudent().getId()},eid=${its.getExam().getId()})}"
                                   th:text="成绩管理"></a>
                            </td>
                        </tr>
                        </tbody>
                    </table>

                    <div class="col-md-2">
                        当前[[${pageInfoL.pageNum}]]页,总共[[${pageInfoL.pages}]]页,总[[${pageInfoL.total}]]条记录
                    </div>

                    <!--                    查询所有课程-->
                    <nav aria-label="Page navigation" th:if="${type=='score'}" style="text-align: center">
                        <ul class="pagination pagination-lg">
                            <li>
                                <a th:href="@{${#request.getRequestURI()}(sid=${student.getId()},pageNum= 1)}">
                                    <span aria-hidden="true">首页</span>
                                </a>
                            </li>
                            <li>
                                <a th:href="@{${#request.getRequestURI()}(sid=${student.getId()},pageNum=${pageInfoL.pageNum -1})}"
                                   th:if="${pageInfoL.hasPreviousPage}" aria-label="Next">
                                    <span aria-hidden="true">&laquo;</span>
                                </a>
                                <a th:href="@{${#request.getRequestURI()}(sid=${student.getId()},pageNum=1)}"
                                   th:if="${pageInfoL.hasPreviousPage==false}" aria-label="Next">
                                    <span aria-hidden="true">&laquo;</span>
                                </a>
                            </li>
                        </ul>
                        <ul class="pagination pagination-lg" th:each="na:${pageInfoL.navigatepageNums}">
                            <li><a th:href="@{${#request.getRequestURI()}(sid=${student.getId()},pageNum=${na})}"
                                   th:if="${pageInfoL.pageNum!=na}"
                                   th:text="${na}"></a></li>
                            <li th:class="active"><a th:class="active" th:href="@{#}" th:if="${pageInfoL.pageNum==na}"
                                                     th:text="${na}"></a></li>
                        </ul>
                        <ul class="pagination pagination-lg">
                            <li>
                                <a th:href="@{${#request.getRequestURI()}(sid=${student.getId()},pageNum=${pageInfoL.pageNum +1})}"
                                   th:if="${pageInfoL.hasNextPage}" aria-label="Next">
                                    <span aria-hidden="true">&raquo;</span>
                                </a>
                                <a th:href="@{${#request.getRequestURI()}(sid=${student.getId()},pageNum=${pageInfoL.pages})}"
                                   th:if="${pageInfoL.hasNextPage==false}" aria-label="Next">
                                    <span aria-hidden="true">&raquo;</span>
                                </a>
                            </li>
                            <li>
                                <a th:href="@{${#request.getRequestURI()}(sid=${student.getId()},pageNum=${pageInfoL.pages})}"
                                   aria-label="Next">
                                    <span aria-hidden="true">末页</span>
                                </a>
                            </li>
                        </ul>
                    </nav>

                    <!--                    根据学院查询 学生-->
                    <nav aria-label="Page navigation" th:if="${type=='cid'}" style="text-align: center">
                        <ul class="pagination pagination-lg">
                            <li>
                                <a th:href="@{${#request.getRequestURI()}(cid=${cid},pageNum= 1)}">
                                    <span aria-hidden="true">首页</span>
                                </a>
                            </li>
                            <li>
                                <a th:href="@{${#request.getRequestURI()}(cid=${cid},pageNum=${pageInfoL.pageNum -1})}"
                                   th:if="${pageInfoL.hasPreviousPage}" aria-label="Next">
                                    <span aria-hidden="true">&laquo;</span>
                                </a>
                                <a th:href="@{${#request.getRequestURI()}(cid=${cid},pageNum=1)}"
                                   th:if="${pageInfoL.hasPreviousPage==false}" aria-label="Next">
                                    <span aria-hidden="true">&laquo;</span>
                                </a>
                            </li>
                        </ul>
                        <ul class="pagination pagination-lg" th:each="na:${pageInfoL.navigatepageNums}">
                            <li><a th:href="@{${#request.getRequestURI()}(cid=${cid},pageNum=${na})}"
                                   th:if="${pageInfoL.pageNum!=na}"
                                   th:text="${na}"></a></li>
                            <li th:class="active"><a th:class="active" th:href="@{#}" th:if="${pageInfoL.pageNum==na}"
                                                     th:text="${na}"></a></li>
                        </ul>
                        <ul class="pagination pagination-lg">
                            <li>
                                <a th:href="@{${#request.getRequestURI()}(cid=${cid},pageNum=${pageInfoL.pageNum +1})}"
                                   th:if="${pageInfoL.hasNextPage}" aria-label="Next">
                                    <span aria-hidden="true">&raquo;</span>
                                </a>
                                <a th:href="@{${#request.getRequestURI()}(cid=${cid},pageNum=${pageInfoL.pages})}"
                                   th:if="${pageInfoL.hasNextPage==false}" aria-label="Next">
                                    <span aria-hidden="true">&raquo;</span>
                                </a>
                            </li>
                            <li>
                                <a th:href="@{${#request.getRequestURI()}(cid=${cid},pageNum=${pageInfoL.pages})}"
                                   aria-label="Next">
                                    <span aria-hidden="true">末页</span>
                                </a>
                            </li>
                        </ul>
                    </nav>

                </div>
            </div>

        </main>
    </div>
</div>

<script>


</script>
</body>

</html>